import xmlrpclib, sys

server = xmlrpclib.Server('http://mac-mini.local/svn/braindump/trunk/xmlrpc.php')

try:  
  while 1:
    query = raw_input('braindump> ')
    result = server.graph.query(query)
    
    if result == False:
      print 'Not set.'
    elif result == True:
      print 'Done.'
    else:
      print result
    
except KeyboardInterrupt: # ctrl-c
  print "\nbye!"
  sys.exit(0)
  
# TODO:
# humanize result arrays
# give an english message instead of 'false' or 'true'
